Optimal. Leaf size=235 \[ -\frac {2 A}{a \sqrt {x}}+\frac {(A b-a B) \tan ^{-1}\left (1-\frac {\sqrt {2} \sqrt [4]{b} \sqrt {x}}{\sqrt [4]{a}}\right )}{\sqrt {2} a^{5/4} b^{3/4}}-\frac {(A b-a B) \tan ^{-1}\left (1+\frac {\sqrt {2} \sqrt [4]{b} \sqrt {x}}{\sqrt [4]{a}}\right )}{\sqrt {2} a^{5/4} b^{3/4}}-\frac {(A b-a B) \log \left (\sqrt {a}-\sqrt {2} \sqrt [4]{a} \sqrt [4]{b} \sqrt {x}+\sqrt {b} x\right )}{2 \sqrt {2} a^{5/4} b^{3/4}}+\frac {(A b-a B) \log \left (\sqrt {a}+\sqrt {2} \sqrt [4]{a} \sqrt [4]{b} \sqrt {x}+\sqrt {b} x\right )}{2 \sqrt {2} a^{5/4} b^{3/4}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.13, antiderivative size = 235, normalized size of antiderivative = 1.00, number of steps
used = 11, number of rules used = 8, integrand size = 22, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.364, Rules used = {464, 335, 303,
1176, 631, 210, 1179, 642} \begin {gather*} \frac {(A b-a B) \text {ArcTan}\left (1-\frac {\sqrt {2} \sqrt [4]{b} \sqrt {x}}{\sqrt [4]{a}}\right )}{\sqrt {2} a^{5/4} b^{3/4}}-\frac {(A b-a B) \text {ArcTan}\left (\frac {\sqrt {2} \sqrt [4]{b} \sqrt {x}}{\sqrt [4]{a}}+1\right )}{\sqrt {2} a^{5/4} b^{3/4}}-\frac {(A b-a B) \log \left (-\sqrt {2} \sqrt [4]{a} \sqrt [4]{b} \sqrt {x}+\sqrt {a}+\sqrt {b} x\right )}{2 \sqrt {2} a^{5/4} b^{3/4}}+\frac {(A b-a B) \log \left (\sqrt {2} \sqrt [4]{a} \sqrt [4]{b} \sqrt {x}+\sqrt {a}+\sqrt {b} x\right )}{2 \sqrt {2} a^{5/4} b^{3/4}}-\frac {2 A}{a \sqrt {x}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 210
Rule 303
Rule 335
Rule 464
Rule 631
Rule 642
Rule 1176
Rule 1179
Rubi steps
\begin {align*} \int \frac {A+B x^2}{x^{3/2} \left (a+b x^2\right )} \, dx &=-\frac {2 A}{a \sqrt {x}}-\frac {\left (2 \left (\frac {A b}{2}-\frac {a B}{2}\right )\right ) \int \frac {\sqrt {x}}{a+b x^2} \, dx}{a}\\ &=-\frac {2 A}{a \sqrt {x}}-\frac {\left (4 \left (\frac {A b}{2}-\frac {a B}{2}\right )\right ) \text {Subst}\left (\int \frac {x^2}{a+b x^4} \, dx,x,\sqrt {x}\right )}{a}\\ &=-\frac {2 A}{a \sqrt {x}}+\frac {(A b-a B) \text {Subst}\left (\int \frac {\sqrt {a}-\sqrt {b} x^2}{a+b x^4} \, dx,x,\sqrt {x}\right )}{a \sqrt {b}}-\frac {(A b-a B) \text {Subst}\left (\int \frac {\sqrt {a}+\sqrt {b} x^2}{a+b x^4} \, dx,x,\sqrt {x}\right )}{a \sqrt {b}}\\ &=-\frac {2 A}{a \sqrt {x}}-\frac {(A b-a B) \text {Subst}\left (\int \frac {1}{\frac {\sqrt {a}}{\sqrt {b}}-\frac {\sqrt {2} \sqrt [4]{a} x}{\sqrt [4]{b}}+x^2} \, dx,x,\sqrt {x}\right )}{2 a b}-\frac {(A b-a B) \text {Subst}\left (\int \frac {1}{\frac {\sqrt {a}}{\sqrt {b}}+\frac {\sqrt {2} \sqrt [4]{a} x}{\sqrt [4]{b}}+x^2} \, dx,x,\sqrt {x}\right )}{2 a b}-\frac {(A b-a B) \text {Subst}\left (\int \frac {\frac {\sqrt {2} \sqrt [4]{a}}{\sqrt [4]{b}}+2 x}{-\frac {\sqrt {a}}{\sqrt {b}}-\frac {\sqrt {2} \sqrt [4]{a} x}{\sqrt [4]{b}}-x^2} \, dx,x,\sqrt {x}\right )}{2 \sqrt {2} a^{5/4} b^{3/4}}-\frac {(A b-a B) \text {Subst}\left (\int \frac {\frac {\sqrt {2} \sqrt [4]{a}}{\sqrt [4]{b}}-2 x}{-\frac {\sqrt {a}}{\sqrt {b}}+\frac {\sqrt {2} \sqrt [4]{a} x}{\sqrt [4]{b}}-x^2} \, dx,x,\sqrt {x}\right )}{2 \sqrt {2} a^{5/4} b^{3/4}}\\ &=-\frac {2 A}{a \sqrt {x}}-\frac {(A b-a B) \log \left (\sqrt {a}-\sqrt {2} \sqrt [4]{a} \sqrt [4]{b} \sqrt {x}+\sqrt {b} x\right )}{2 \sqrt {2} a^{5/4} b^{3/4}}+\frac {(A b-a B) \log \left (\sqrt {a}+\sqrt {2} \sqrt [4]{a} \sqrt [4]{b} \sqrt {x}+\sqrt {b} x\right )}{2 \sqrt {2} a^{5/4} b^{3/4}}-\frac {(A b-a B) \text {Subst}\left (\int \frac {1}{-1-x^2} \, dx,x,1-\frac {\sqrt {2} \sqrt [4]{b} \sqrt {x}}{\sqrt [4]{a}}\right )}{\sqrt {2} a^{5/4} b^{3/4}}+\frac {(A b-a B) \text {Subst}\left (\int \frac {1}{-1-x^2} \, dx,x,1+\frac {\sqrt {2} \sqrt [4]{b} \sqrt {x}}{\sqrt [4]{a}}\right )}{\sqrt {2} a^{5/4} b^{3/4}}\\ &=-\frac {2 A}{a \sqrt {x}}+\frac {(A b-a B) \tan ^{-1}\left (1-\frac {\sqrt {2} \sqrt [4]{b} \sqrt {x}}{\sqrt [4]{a}}\right )}{\sqrt {2} a^{5/4} b^{3/4}}-\frac {(A b-a B) \tan ^{-1}\left (1+\frac {\sqrt {2} \sqrt [4]{b} \sqrt {x}}{\sqrt [4]{a}}\right )}{\sqrt {2} a^{5/4} b^{3/4}}-\frac {(A b-a B) \log \left (\sqrt {a}-\sqrt {2} \sqrt [4]{a} \sqrt [4]{b} \sqrt {x}+\sqrt {b} x\right )}{2 \sqrt {2} a^{5/4} b^{3/4}}+\frac {(A b-a B) \log \left (\sqrt {a}+\sqrt {2} \sqrt [4]{a} \sqrt [4]{b} \sqrt {x}+\sqrt {b} x\right )}{2 \sqrt {2} a^{5/4} b^{3/4}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.19, size = 135, normalized size = 0.57 \begin {gather*} -\frac {2 A}{a \sqrt {x}}-\frac {(-A b+a B) \tan ^{-1}\left (\frac {\sqrt {a}-\sqrt {b} x}{\sqrt {2} \sqrt [4]{a} \sqrt [4]{b} \sqrt {x}}\right )}{\sqrt {2} a^{5/4} b^{3/4}}-\frac {(-A b+a B) \tanh ^{-1}\left (\frac {\sqrt {2} \sqrt [4]{a} \sqrt [4]{b} \sqrt {x}}{\sqrt {a}+\sqrt {b} x}\right )}{\sqrt {2} a^{5/4} b^{3/4}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.10, size = 127, normalized size = 0.54
method | result | size |
derivativedivides | \(-\frac {\left (A b -B a \right ) \sqrt {2}\, \left (\ln \left (\frac {x -\left (\frac {a}{b}\right )^{\frac {1}{4}} \sqrt {x}\, \sqrt {2}+\sqrt {\frac {a}{b}}}{x +\left (\frac {a}{b}\right )^{\frac {1}{4}} \sqrt {x}\, \sqrt {2}+\sqrt {\frac {a}{b}}}\right )+2 \arctan \left (\frac {\sqrt {2}\, \sqrt {x}}{\left (\frac {a}{b}\right )^{\frac {1}{4}}}+1\right )+2 \arctan \left (\frac {\sqrt {2}\, \sqrt {x}}{\left (\frac {a}{b}\right )^{\frac {1}{4}}}-1\right )\right )}{4 a b \left (\frac {a}{b}\right )^{\frac {1}{4}}}-\frac {2 A}{a \sqrt {x}}\) | \(127\) |
default | \(-\frac {\left (A b -B a \right ) \sqrt {2}\, \left (\ln \left (\frac {x -\left (\frac {a}{b}\right )^{\frac {1}{4}} \sqrt {x}\, \sqrt {2}+\sqrt {\frac {a}{b}}}{x +\left (\frac {a}{b}\right )^{\frac {1}{4}} \sqrt {x}\, \sqrt {2}+\sqrt {\frac {a}{b}}}\right )+2 \arctan \left (\frac {\sqrt {2}\, \sqrt {x}}{\left (\frac {a}{b}\right )^{\frac {1}{4}}}+1\right )+2 \arctan \left (\frac {\sqrt {2}\, \sqrt {x}}{\left (\frac {a}{b}\right )^{\frac {1}{4}}}-1\right )\right )}{4 a b \left (\frac {a}{b}\right )^{\frac {1}{4}}}-\frac {2 A}{a \sqrt {x}}\) | \(127\) |
risch | \(-\frac {2 A}{a \sqrt {x}}-\frac {\sqrt {2}\, A \arctan \left (\frac {\sqrt {2}\, \sqrt {x}}{\left (\frac {a}{b}\right )^{\frac {1}{4}}}+1\right )}{2 a \left (\frac {a}{b}\right )^{\frac {1}{4}}}-\frac {\sqrt {2}\, A \arctan \left (\frac {\sqrt {2}\, \sqrt {x}}{\left (\frac {a}{b}\right )^{\frac {1}{4}}}-1\right )}{2 a \left (\frac {a}{b}\right )^{\frac {1}{4}}}-\frac {\sqrt {2}\, A \ln \left (\frac {x -\left (\frac {a}{b}\right )^{\frac {1}{4}} \sqrt {x}\, \sqrt {2}+\sqrt {\frac {a}{b}}}{x +\left (\frac {a}{b}\right )^{\frac {1}{4}} \sqrt {x}\, \sqrt {2}+\sqrt {\frac {a}{b}}}\right )}{4 a \left (\frac {a}{b}\right )^{\frac {1}{4}}}+\frac {\sqrt {2}\, B \arctan \left (\frac {\sqrt {2}\, \sqrt {x}}{\left (\frac {a}{b}\right )^{\frac {1}{4}}}+1\right )}{2 b \left (\frac {a}{b}\right )^{\frac {1}{4}}}+\frac {\sqrt {2}\, B \arctan \left (\frac {\sqrt {2}\, \sqrt {x}}{\left (\frac {a}{b}\right )^{\frac {1}{4}}}-1\right )}{2 b \left (\frac {a}{b}\right )^{\frac {1}{4}}}+\frac {\sqrt {2}\, B \ln \left (\frac {x -\left (\frac {a}{b}\right )^{\frac {1}{4}} \sqrt {x}\, \sqrt {2}+\sqrt {\frac {a}{b}}}{x +\left (\frac {a}{b}\right )^{\frac {1}{4}} \sqrt {x}\, \sqrt {2}+\sqrt {\frac {a}{b}}}\right )}{4 b \left (\frac {a}{b}\right )^{\frac {1}{4}}}\) | \(277\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.53, size = 194, normalized size = 0.83 \begin {gather*} \frac {{\left (B a - A b\right )} {\left (\frac {2 \, \sqrt {2} \arctan \left (\frac {\sqrt {2} {\left (\sqrt {2} a^{\frac {1}{4}} b^{\frac {1}{4}} + 2 \, \sqrt {b} \sqrt {x}\right )}}{2 \, \sqrt {\sqrt {a} \sqrt {b}}}\right )}{\sqrt {\sqrt {a} \sqrt {b}} \sqrt {b}} + \frac {2 \, \sqrt {2} \arctan \left (-\frac {\sqrt {2} {\left (\sqrt {2} a^{\frac {1}{4}} b^{\frac {1}{4}} - 2 \, \sqrt {b} \sqrt {x}\right )}}{2 \, \sqrt {\sqrt {a} \sqrt {b}}}\right )}{\sqrt {\sqrt {a} \sqrt {b}} \sqrt {b}} - \frac {\sqrt {2} \log \left (\sqrt {2} a^{\frac {1}{4}} b^{\frac {1}{4}} \sqrt {x} + \sqrt {b} x + \sqrt {a}\right )}{a^{\frac {1}{4}} b^{\frac {3}{4}}} + \frac {\sqrt {2} \log \left (-\sqrt {2} a^{\frac {1}{4}} b^{\frac {1}{4}} \sqrt {x} + \sqrt {b} x + \sqrt {a}\right )}{a^{\frac {1}{4}} b^{\frac {3}{4}}}\right )}}{4 \, a} - \frac {2 \, A}{a \sqrt {x}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 843 vs.
\(2 (166) = 332\).
time = 0.86, size = 843, normalized size = 3.59 \begin {gather*} \frac {4 \, a x \left (-\frac {B^{4} a^{4} - 4 \, A B^{3} a^{3} b + 6 \, A^{2} B^{2} a^{2} b^{2} - 4 \, A^{3} B a b^{3} + A^{4} b^{4}}{a^{5} b^{3}}\right )^{\frac {1}{4}} \arctan \left (\frac {\sqrt {{\left (B^{6} a^{6} - 6 \, A B^{5} a^{5} b + 15 \, A^{2} B^{4} a^{4} b^{2} - 20 \, A^{3} B^{3} a^{3} b^{3} + 15 \, A^{4} B^{2} a^{2} b^{4} - 6 \, A^{5} B a b^{5} + A^{6} b^{6}\right )} x - {\left (B^{4} a^{7} b - 4 \, A B^{3} a^{6} b^{2} + 6 \, A^{2} B^{2} a^{5} b^{3} - 4 \, A^{3} B a^{4} b^{4} + A^{4} a^{3} b^{5}\right )} \sqrt {-\frac {B^{4} a^{4} - 4 \, A B^{3} a^{3} b + 6 \, A^{2} B^{2} a^{2} b^{2} - 4 \, A^{3} B a b^{3} + A^{4} b^{4}}{a^{5} b^{3}}}} a b \left (-\frac {B^{4} a^{4} - 4 \, A B^{3} a^{3} b + 6 \, A^{2} B^{2} a^{2} b^{2} - 4 \, A^{3} B a b^{3} + A^{4} b^{4}}{a^{5} b^{3}}\right )^{\frac {1}{4}} + {\left (B^{3} a^{4} b - 3 \, A B^{2} a^{3} b^{2} + 3 \, A^{2} B a^{2} b^{3} - A^{3} a b^{4}\right )} \sqrt {x} \left (-\frac {B^{4} a^{4} - 4 \, A B^{3} a^{3} b + 6 \, A^{2} B^{2} a^{2} b^{2} - 4 \, A^{3} B a b^{3} + A^{4} b^{4}}{a^{5} b^{3}}\right )^{\frac {1}{4}}}{B^{4} a^{4} - 4 \, A B^{3} a^{3} b + 6 \, A^{2} B^{2} a^{2} b^{2} - 4 \, A^{3} B a b^{3} + A^{4} b^{4}}\right ) - a x \left (-\frac {B^{4} a^{4} - 4 \, A B^{3} a^{3} b + 6 \, A^{2} B^{2} a^{2} b^{2} - 4 \, A^{3} B a b^{3} + A^{4} b^{4}}{a^{5} b^{3}}\right )^{\frac {1}{4}} \log \left (a^{4} b^{2} \left (-\frac {B^{4} a^{4} - 4 \, A B^{3} a^{3} b + 6 \, A^{2} B^{2} a^{2} b^{2} - 4 \, A^{3} B a b^{3} + A^{4} b^{4}}{a^{5} b^{3}}\right )^{\frac {3}{4}} - {\left (B^{3} a^{3} - 3 \, A B^{2} a^{2} b + 3 \, A^{2} B a b^{2} - A^{3} b^{3}\right )} \sqrt {x}\right ) + a x \left (-\frac {B^{4} a^{4} - 4 \, A B^{3} a^{3} b + 6 \, A^{2} B^{2} a^{2} b^{2} - 4 \, A^{3} B a b^{3} + A^{4} b^{4}}{a^{5} b^{3}}\right )^{\frac {1}{4}} \log \left (-a^{4} b^{2} \left (-\frac {B^{4} a^{4} - 4 \, A B^{3} a^{3} b + 6 \, A^{2} B^{2} a^{2} b^{2} - 4 \, A^{3} B a b^{3} + A^{4} b^{4}}{a^{5} b^{3}}\right )^{\frac {3}{4}} - {\left (B^{3} a^{3} - 3 \, A B^{2} a^{2} b + 3 \, A^{2} B a b^{2} - A^{3} b^{3}\right )} \sqrt {x}\right ) - 4 \, A \sqrt {x}}{2 \, a x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 7.05, size = 150, normalized size = 0.64 \begin {gather*} A \left (\begin {cases} \frac {\tilde {\infty }}{x^{\frac {5}{2}}} & \text {for}\: a = 0 \wedge b = 0 \\- \frac {2}{5 b x^{\frac {5}{2}}} & \text {for}\: a = 0 \\- \frac {2}{a \sqrt {x}} & \text {for}\: b = 0 \\- \frac {\log {\left (\sqrt {x} - \sqrt [4]{- \frac {a}{b}} \right )}}{2 a \sqrt [4]{- \frac {a}{b}}} + \frac {\log {\left (\sqrt {x} + \sqrt [4]{- \frac {a}{b}} \right )}}{2 a \sqrt [4]{- \frac {a}{b}}} - \frac {\operatorname {atan}{\left (\frac {\sqrt {x}}{\sqrt [4]{- \frac {a}{b}}} \right )}}{a \sqrt [4]{- \frac {a}{b}}} - \frac {2}{a \sqrt {x}} & \text {otherwise} \end {cases}\right ) + 2 B \operatorname {RootSum} {\left (256 t^{4} a b^{3} + 1, \left ( t \mapsto t \log {\left (64 t^{3} a b^{2} + \sqrt {x} \right )} \right )\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.71, size = 251, normalized size = 1.07 \begin {gather*} -\frac {2 \, A}{a \sqrt {x}} + \frac {\sqrt {2} {\left (\left (a b^{3}\right )^{\frac {3}{4}} B a - \left (a b^{3}\right )^{\frac {3}{4}} A b\right )} \arctan \left (\frac {\sqrt {2} {\left (\sqrt {2} \left (\frac {a}{b}\right )^{\frac {1}{4}} + 2 \, \sqrt {x}\right )}}{2 \, \left (\frac {a}{b}\right )^{\frac {1}{4}}}\right )}{2 \, a^{2} b^{3}} + \frac {\sqrt {2} {\left (\left (a b^{3}\right )^{\frac {3}{4}} B a - \left (a b^{3}\right )^{\frac {3}{4}} A b\right )} \arctan \left (-\frac {\sqrt {2} {\left (\sqrt {2} \left (\frac {a}{b}\right )^{\frac {1}{4}} - 2 \, \sqrt {x}\right )}}{2 \, \left (\frac {a}{b}\right )^{\frac {1}{4}}}\right )}{2 \, a^{2} b^{3}} - \frac {\sqrt {2} {\left (\left (a b^{3}\right )^{\frac {3}{4}} B a - \left (a b^{3}\right )^{\frac {3}{4}} A b\right )} \log \left (\sqrt {2} \sqrt {x} \left (\frac {a}{b}\right )^{\frac {1}{4}} + x + \sqrt {\frac {a}{b}}\right )}{4 \, a^{2} b^{3}} + \frac {\sqrt {2} {\left (\left (a b^{3}\right )^{\frac {3}{4}} B a - \left (a b^{3}\right )^{\frac {3}{4}} A b\right )} \log \left (-\sqrt {2} \sqrt {x} \left (\frac {a}{b}\right )^{\frac {1}{4}} + x + \sqrt {\frac {a}{b}}\right )}{4 \, a^{2} b^{3}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.08, size = 71, normalized size = 0.30 \begin {gather*} \frac {\mathrm {atan}\left (\frac {b^{1/4}\,\sqrt {x}}{{\left (-a\right )}^{1/4}}\right )\,\left (A\,b-B\,a\right )}{{\left (-a\right )}^{5/4}\,b^{3/4}}-\frac {2\,A}{a\,\sqrt {x}}-\frac {\mathrm {atanh}\left (\frac {b^{1/4}\,\sqrt {x}}{{\left (-a\right )}^{1/4}}\right )\,\left (A\,b-B\,a\right )}{{\left (-a\right )}^{5/4}\,b^{3/4}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________